package com.dailyblue.project.estate.controller;

import com.dailyblue.project.estate.service.OllamaService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Flux;

/**
 * @Auther:Liu
 * @Testname:OllamaController
 * @Date:2025/9/24 09:58
 */
@CrossOrigin
@RestController
@RequestMapping("/ollama_ai")
public class OllamaController {
    @Resource
    private OllamaService ollamaService;

    @RequestMapping
    Flux<String> stream(@RequestParam("question")String question) {
        return ollamaService.getOllama(question);
    }

}
